package cn.tude.boot13.controller;

import cn.tude.boot13.vo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@Controller
public class HelloController {
    @RequestMapping("/hello")
    @ResponseBody
    public String hello(HttpServletRequest request){
        String info = request.getParameter("info");
        return "我是服务器<b>我是标签</b>我是参数:"+info;
    }

    @RequestMapping("/reg")
    @ResponseBody
    public String reg(User user){
        System.out.println("user="+user);
        return "成功";
    }
}
